mergHK
Type
library
Description
mergHK is an iOS HealthKit external for LiveCode. To use this external
you must have use a provisioning profile with the HealthKit entitlement
enabled. The Entitlements.xcent file in the iOS runtime directories
inside the LiveCode app bundle need to me edited to include the
com.apple.developer.healthkit entitlement.
Associated Syntax
Function
| Name | Summary | Syntax |
|---|---|---|
| mergHKIsHealthDataAvailable | Check to see if HealthKit is available | mergHKIsHealthDataAvailable() |
| mergHKCheckAuthorization | Checks the current authorization status for a type identifier | mergHKCheckAuthorization(<pIdentifier>) |
| mergHKBiologicalSex | Reads the user's biological sex setting | mergHKBiologicalSex() |
| mergHKBloodType | Reads the user's blood type setting | mergHKBloodType() |
| mergHKDateOfBirth | Reads the user's date of birth setting | mergHKDateOfBirth() |
| mergHKFitzpatrickSkinType | Reads the user's skin type based on the Fitzpatrick scale | mergHKFitzpatrickSkinType() |
Command
| Name | Summary | Syntax |
|---|---|---|
| mergHKRequestAuthorization | Requests permission to save and read the specified data types | mergHKRequestAuthorization <pShareIdentifiers>, <pReadIdentifiers> |
| mergHKSampleQuery | Query samples between given dates | mergHKSampleQuery <pIdentifier>, <pStartDate>, <pEndDate>, [<pLimit>], [<pSortIdentifier>], [<pSortDirection>] |
| mergHKStopQuery | Stop a running query | mergHKStopQuery <pQueryID> |
| mergHKAddQuantitySample | Add a quantity sample | mergHKAddQuantitySample <pIdentifier>, <pStartDate>, <pEndDate>, <pValue>, <pUnits>, [<pWorkoutUUID>], [<pMetadata>] |
| mergHKAddWorkout | Add a workout | mergHKAddWorkout <pWorkoutType>, <pStartDate>, <pEndDate>, [<pTotalEnergyBurned>], [<pEnergyBurnedUnits>], [<pTotalDistance>], [<pDistanceUnits>], [<pMetadata>] |
Message
| Name | Summary | Syntax |
|---|---|---|
| mergHKAuthorizationComplete | Sent to the object that called mergHKRequestAuthorization when the authorization is complete | mergHKAuthorizationComplete <pError> |
| mergHKQueryResults | Sent to the object that initiated a query | mergHKQueryResults <pQueryID>, <pResultA>, <pError> |